#coding:utf-8
"""
*   TG_Coder : Dzlua
*   Email    : 505544956@qq.com
*   Time     : 2017/09/06
"""
#--------------------#
from utilities import helper
import config

#--------------------#
def _req_prots(cmd):
    return helper.req_prots(config.ColeHost, config.ColePort, cmd)

#--------------------#
def so(libname, content, pagecount=None):
    command = u'so\r\n' + content + '\r\n' + libname
    if pagecount:
        command = command + u'\r\n%s' % pagecount
    return _req_prots(command)
#----------#
def dir():
    return 'dir'
#----------#
def file():
    return 'file'
#----------#
def select():
    return 'select'
#--------------------#
